import java.util.Arrays;

public class Test {

    public static void main(String[] args) {

        int[] arr = {5,9,4,3,7,1,6,2,10,8};
        int[] arr2 = {5,9,4,3,7,1,6,2,10,8};

        int[] arr3 = {1,2,4,5,7,1,4,5,2,3,3,6,9,5,2,1,2,8,2,1,4,3,9,5};
        int[] arr4 = {90,98,94,92,94,92,93,91,97,92,99,91,99,94,95,99,93,90,99,92};

        Sort.mergeSort1(arr);
        System.out.print("归并排序：");
        System.out.println(Arrays.toString(arr));

        Sort.mergeSort2(arr2);
        System.out.print("归并排序（非递归）：");
        System.out.println(Arrays.toString(arr2));

        Sort.countSort(arr3);
        System.out.print("计数排序：");
        System.out.println(Arrays.toString(arr3));

        Sort.countSort(arr4);
        System.out.print("计数排序：");
        System.out.println(Arrays.toString(arr4));

    }


    public static void main1(String[] args) {
        int[] arr = {5,9,4,3,7,1,6,2,10,8};
        int[] arr2 = {5,9,4,3,7,1,6,2,10,8};
        int[] arr3 = {5,9,4,3,7,1,6,2,10,8};
        int[] arr4 = {5,9,4,3,7,1,6,2,10,8};
        int[] arr5 = {5,9,4,3,7,1,6,2,10,8};

        int[] arr6 = {5,9,4,3,7,1,6,2,10,8};
        int[] arr7 = {5,9,4,3,7,1,6,2,10,8};
        int[] arr8 = {5,9,4,3,7,1,6,2,10,8};
        int[] arr9 = {5,9,4,3,7,1,6,2,10,8};

        int[] arr10 = {5,9,4,3,7,1,6,2,10,8};
        int[] arr11 = {5,9,4,3,7,1,6,2,10,8};

        int[] arr12 = {1,2,4,5,7,1,4,5,2,3,3,6,9,5,2,1,2,8,2,1,4,3,9,5};
        int[] arr13 = {90,98,94,92,94,92,93,91,97,92,99,91,99,94,95,99,93,90,99,92};


        //选择排序
        Sort.select(arr);
        System.out.print("选择排序：");
        System.out.println(Arrays.toString(arr));

        //堆排序
        Sort.isDui(arr2);
        System.out.print("堆排序：");
        System.out.println(Arrays.toString(arr2));

        //冒泡排序
        Sort.Maopao(arr3);
        System.out.print("冒泡排序：");
        System.out.println(Arrays.toString(arr3));

        //快速排序（Hoare法）
        Sort.fast1(arr4);
        System.out.print("快速排序快速排序（Hoare法）：");
        System.out.println(Arrays.toString(arr4));

        //快速排序（挖坑法）
        Sort.fastone(arr5);
        System.out.print("快速排序（挖坑法）：");
        System.out.println(Arrays.toString(arr5));

/////////////////////////////////////////////////////////
        System.out.println("============");
        Sort.selectSort(arr6);
        System.out.print("选择排序：");
        System.out.println(Arrays.toString(arr6));

        Sort.heapSort(arr7);
        System.out.print("堆排序：");
        System.out.println(Arrays.toString(arr7));

        Sort.bubbleSort(arr8);
        System.out.print("冒泡排序：");
        System.out.println(Arrays.toString(arr8));

        Sort.quickSort(arr9);
        System.out.print("快速排序快速排序（Hoare法）：");
        System.out.println(Arrays.toString(arr9));

        System.out.println("=============");

        Sort.guibing(arr10);
        System.out.print("归并排序：");
        System.out.println(Arrays.toString(arr10));

        Sort.guibing(arr11);
        System.out.print("归并排序（非递归）：");
        System.out.println(Arrays.toString(arr11));

        Sort.guibing(arr12);
        System.out.print("计数排序：");
        System.out.println(Arrays.toString(arr12));

        Sort.guibing(arr13);
        System.out.print("计数排序：");
        System.out.println(Arrays.toString(arr13));




    }
}
